<template>
  <div class="userStar">
    <myheader>
      <template #left>
        <van-icon name="arrow-left" @click="$router.go(-1)" />
      </template>
      <template #center>
        <span>我的收藏</span>
      </template>
    </myheader>

    <!-- 新闻模块结构复用 -->
    <postblock
      v-for="item in userStarList"
      :key="item.id"
      :post="item"
    ></postblock>
  </div>
</template>

<script>
import myheader from "@/components/myheader";
import postblock from "@/components/postblock";
import { userStar } from "@/api/user";
export default {
  data() {
    return {
      userStarList: {},
    };
  },
  components: {
    myheader,
    postblock,
  },
  async mounted() {
    let res = await userStar();
    //console.log(res);
    this.userStarList = res.data.data;
  },
};
</script>

<style>
</style>